home *** CD-ROM | disk | FTP | other *** search
- <%@ Language=VBScript %>
- <%' (c) Copyright 1999-2004 PaperCut Software Pty. Ltd. %>
- <!-- #INCLUDE FILE="includes/PCCommon.inc" -->
- <%
- Dim intMAX_COUNT
- intMAX_COUNT = 100
-
- Function TranslateTransBy(s)
- If s = "[net use]" Then
- TranslateTransBy = "[" & GetText("TransByNetUse") & "]"
- ElseIf s = "[printer use]" Then
- TranslateTransBy = "[" & GetText("TransByPrintUse") & "]"
- ElseIf s = "[automatic]" Then
- TranslateTransBy = "[" & GetText("TransByAutomatic") & "]"
- ElseIf Instr(s, "[transfer from") = 1 Then
- TranslateTransBy = "[" & GetTextReplace("TransByTransFrom", Array(Mid(s, 15, Len(s)-15))) & "]"
- ElseIf Instr(s, "[transfer to") = 1 Then
- TranslateTransBy = "[" & GetTextReplace("TransByTransTo", Array(Mid(s, 13, Len(s)-13))) & "]"
- Else
- TranslateTransBy = s
- End If
- End Function
-
- %>
- <!-- #INCLUDE FILE="includes/header.inc" -->
- <%
-
- Dim objPCWebAuditLog
- Set objPCWebAuditLog = CreateObject("PCWebAdmin.PCWebAuditLog")
- If objPCWebAuditLog.Error Then
- WriteErrorMessage objPCWebAuditLog.ErrorDescription
- End If
-
- Dim strUserName
- strUserName = Trim(Request("strUserName"))
-
- If Not gblnIsAdmin or Request("strMyLogs") <> "" Then
- strUserName = gstrLoggedInUser
- End If
-
- If strUserName <> "" Then
- objPCWebAuditLog.RestrictedOnUser(Trim(strUserName))
- Response.Write "<H1>" & GetTextReplace("RecentTransactionsFor", Array(strUserName)) & "</H1>"
- WriteUserAdminLinks(strUserName)
- Call DisplayList(False)
- WriteUserAdminLinks(strUserName)
- Else
- 'objPCWebAuditLog.FullLog ' Defaults to this anyway
- Response.Write "<H1>" & GetText("RecentTransactions") & "</H1>"
- Call DisplayList(True)
- End If
- Set objPCWebAuditLog = Nothing
-
- Sub DisplayList(blnShowUser)
- Response.Write "<CENTER>" & vbCRLF
- Response.Write "<TABLE class=""webAdmin"" width=""95%"" >" & vbCRLF
- Response.Write "<TR>" & vbCRLF
- Response.Write "<TH>" & GetText("Time") & "</TH>" & vbCRLF
- If blnShowUser Then
- Response.Write "<TH >" & GetText("User") & "</TH>" & vbCRLF
- End If
- Response.Write "<TH>" & GetText("Amount") & "</TH>" & vbCRLF
- Response.Write "<TH>" & GetText("CreditAfterTrans") & "</TH>" & vbCRLF
- Response.Write "<TH>" & GetText("TransactedBy") & "</TH>" & vbCRLF
- Response.Write "<TH>" & GetText("Comment") & "</TH>" & vbCRLF
- Response.Write "</TR>" & vbCRLF
-
-
- objPCWebAuditLog.MoveFirst
- Dim intCount
- intCount = 0
-
- do while ((not objPCWebAuditLog.EOF) and intCount < intMAX_COUNT)
-
- Response.Write "<TR class=""" & RowClassHelper(intCount) & """>" & vbCRLF
- Response.Write "<TD nowrap align=left>" & objPCWebAuditLog.TransactionTime & "</TD>" & vbCRLF
-
- If blnShowUser Then
- Response.Write "<TD nowrap align=left><a title=""" & GetTextReplace("ViewUserTrans", Array(objPCWebAuditLog.UserName)) & """ href=""TransLog.asp?strUserName=" & Server.URLEncode(objPCWebAuditLog.UserName) & """>" & objPCWebAuditLog.UserName & "</A></TD>" & vbCRLF
- End If
-
- If objPCWebAuditLog.TransactionAmount < 0 Then
- Response.Write "<TD align=right class=""creditNeg"">" & objPCWebAuditLog.TransactionAmountText & "</TD>" & vbCRLF
- Else
- Response.Write "<TD align=right class=""creditPos"">" & objPCWebAuditLog.TransactionAmountText & "</TD>" & vbCRLF
- End If
-
- Response.Write "<TD align=right>" & objPCWebAuditLog.AmountAfterTransactionText & "</TD>" & vbCRLF
- Response.Write "<TD align=left>" & TranslateTransBy(objPCWebAuditLog.TransactedBy) & "</TD>" & vbCRLF
- Response.Write "<TD align=left>" & TranslateTransBy(objPCWebAuditLog.Comment) & "</TD>" & vbCRLF
-
- Response.Write "</TR>" & vbCRLF
- objPCWebAuditLog.MoveNext
- intCount = intCount + 1
- loop
- Response.Write "</TABLE>" & vbCRLF
- Response.Write "</CENTER>" & vbCRLF
-
-
- End Sub
-
-
- %>
- </CENTER>
- <!-- #INCLUDE FILE="includes/footer.inc" -->